package o;

import android.view.View;
import android.view.View.OnClickListener;
import com.huawei.appgallery.appcomment.api.UserCommentListActivityProtocol;
import com.huawei.appgallery.appcomment.api.UserCommentListActivityProtocol.Request;
import com.huawei.appgallery.appcomment.impl.bean.AppInfoBean;
import com.huawei.appgallery.appcomment.impl.bean.GetCommentResBean.AppCommentInfo;
import com.huawei.appgallery.appcomment.ui.view.CommentItemView;
import com.huawei.appgallery.appcomment.ui.view.CommentTitleView;
import com.huawei.appgallery.appcomment.ui.view.CommentTitleView.d;

public class bek {
    private CommentTitleView ˋ = null;

    public static class e implements OnClickListener {
        private String ॱ;

        public e(String str) {
            this.ॱ = str;
        }

        public void onClick(View view) {
            if (view != null) {
                cjo userCommentListActivityProtocol = new UserCommentListActivityProtocol();
                Request request = new Request();
                request.ˏ(this.ॱ);
                userCommentListActivityProtocol.ˎ(request);
                cjk.ˎ().ˋ(view.getContext(), new cjm("usercomment.activity", userCommentListActivityProtocol));
            }
        }
    }

    public boolean ˋ(View view, int i) {
        switch (i) {
            case 1:
                this.ˋ = (CommentTitleView) view;
                return true;
            case 3:
                return true;
            default:
                return false;
        }
    }

    public void ˎ(AppCommentInfo appCommentInfo, View view, AppInfoBean appInfoBean, boolean z) {
        if (appCommentInfo != null) {
            switch (appCommentInfo.ˉ()) {
                case 1:
                    this.ˋ.setTitleViewByType(d.HotComment);
                    return;
                case 3:
                    ((CommentItemView) view).ˋ(appCommentInfo, appInfoBean, z);
                    return;
                default:
                    return;
            }
        }
    }
}
